Testing Microservices with Mountebank by Brandon Byars

Testing Microservices with Mountebank by Brandon Byars

Author:Brandon Byars [Brandon Byars]
Language: eng
Format: epub
Publisher: Manning Publications
Published: 2018-12-04T16:00:00+00:00


1 Only adds to the list if it hasn’t seen this day before

2 Adds new humidity

3 Switches these functions to use state variable

Voilà! Now the virtual roadie service can keep track of humidity levels across multiple requests. There is only one feature of injection left to look at, but it is a big topic: asynchronous operations.

6.2.2. Adding async

Asynchronicity is baked into JavaScript, to the extent that it is generally required to access any file or network resource used to craft a dynamic response. Understanding why requires a quick tour of how programming languages manage I/O, as JavaScript is fairly unusual in this regard. Until Microsoft introduced the XMLHttpRequest object that powers AJAX requests, JavaScript lacked any form of I/O found in the base class libraries of other languages. It took Node.js to add a full complement of I/O functions to JavaScript, but it did so following the AJAX pattern familiar to a generation of web developers: using callbacks.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.